package com.ssy.lingxi.enhance.repository;


import com.ssy.lingxi.enhance.entity.PNOReceiveDeliverDetailDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 生产通知单收发货明细 - 实体仓库
 * @author fhj
 * @version 2.0.0
 * @date 2020/11/04
 */
public interface PNOReceiveDeliverDetailRepository extends JpaRepository<PNOReceiveDeliverDetailDO, Long>, JpaSpecificationExecutor<PNOReceiveDeliverDetailDO> {

    List<PNOReceiveDeliverDetailDO> findByProduceNoticeOrderId(Long produceNoticeOrderId);

    PNOReceiveDeliverDetailDO findByProduceNoticeOrderIdAndDeliverStatus(Long produceNoticeOrderId, Integer status);

    PNOReceiveDeliverDetailDO findByProduceNoticeOrderIdAndReceiveStatus(Long produceNoticeOrderId, Integer status);

    PNOReceiveDeliverDetailDO findByProduceNoticeOrderIdAndDeliveryId(Long produceNoticeOrderId, Long deliveryId);

    PNOReceiveDeliverDetailDO findByProduceNoticeOrderIdAndStorageId(Long produceNoticeOrderId, Long storageId);
}
